SDK/J Authentication Package ver1.0
RICOH Confidential

jp.co.ricoh.dsdk.scard.framework.card
Class CardManager

java.lang.Object
  extended byjp.co.ricoh.dsdk.scard.framework.card.CardManager

public class CardManager
extends java.lang.Object

This class is the core class of the Framework.


Field Summary
static int INFINITY
           When this constant is specified to the waitForCard method, no timeout will occur.
 
Constructor Summary
CardManager()
           Constructs a new CardManager object.
 
Method Summary
 void abort()
           Interrupts all waitForCard invocations that are currently being executed by this card manager.
 void addCardListener(CardEventListener listener)
           Adds a CardListener.
protected  void finalize()
           
 Slot[] listSlots()
           Obtains a list of the slots that are currently available.
 void removeCardListener(CardEventListener listener)
           Removes a CardListener.
 Card waitForCard(long ms)
           Waits until a card is inserted in a slot.
 Card waitForCard(long ms, CardFilter filter)
           Waits until a card is inserted in a slot.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFINITY

public static int INFINITY
When this constant is specified to the waitForCard method, no timeout will occur.

Constructor Detail

CardManager

public CardManager()
            throws InitializeException
Constructs a new CardManager object.

Throws:
InitializeException - when an error has occurred in the initialization of the card manager.
Method Detail

listSlots

public Slot[] listSlots()
                 throws SlotAccessException
Obtains a list of the slots that are currently available.

Returns:
an array of the slots.
Throws:
SlotAccessException - when an error has occurred in the obtainment of a list of the slots.

waitForCard

public Card waitForCard(long ms)
                 throws TimeoutException
Waits until a card is inserted in a slot.

Parameters:
ms - a timeout specified in millisecond. If CardManager.INFINITY is specified, a timeout will never occur.
Returns:
the inserted card, or null when the abort method is called).
Throws:
TimeoutException - when a timeout has occurred.

waitForCard

public Card waitForCard(long ms,
                        CardFilter filter)
                 throws TimeoutException
Waits until a card is inserted in a slot.

Parameters:
ms - a timeout specified in millisecond. If CardManager.INFINITY is specified, a timeout will never occur.
filter - a CardFilter.
Returns:
the inserted card, or null when the abort method is called)}.
Throws:
TimeoutException - when a timeout has occurred.

addCardListener

public void addCardListener(CardEventListener listener)
Adds a CardListener.

Parameters:
listener - The CardListener to be added.

removeCardListener

public void removeCardListener(CardEventListener listener)
Removes a CardListener.

Parameters:
listener - The CardListener to be removed.

abort

public void abort()
Interrupts all waitForCard invocations that are currently being executed by this card manager.


finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

SDK/J Authentication Package ver1.0
RICOH Confidential